import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 26727
 * Date: 2025-07-15
 * Time: 21:42
 */

public class ExtractAndSumNumbers {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        int sum = extractAndSumNumbers(s);
        System.out.println("提取的数字之和为: " + sum);
    }

    public static int extractAndSumNumbers(String input) {
        int sum = 0;
        StringBuilder currentNumber = new StringBuilder();

        for (char c : input.toCharArray()) {
            if (c >= '0' && c <= '9') {
                currentNumber.append(c);
            } else {
                if (currentNumber.length() > 0) {
                    sum += Integer.parseInt(currentNumber.toString());
                    currentNumber.setLength(0);
                }
            }
        }

        // 处理字符串末尾的数字
        if (currentNumber.length() > 0) {
            sum += Integer.parseInt(currentNumber.toString());
        }

        return sum;
    }
}
